home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / sox.zip / MAKEFILE < prev    next >
Text File  |  1992-06-15  |  2KB  |  93 lines

  1.  
  2. # Sound Tools Makefile
  3. #     builds libst.a and sox
  4.  
  5. FSRC= raw.c voc.c au.c sf.c aiff.c hcom.c 8svx.c sndrtool.c wav.c sbdsp.c
  6. ESRC= copy.c avg.c pred.c stat.c vibro.c echo.c rate.c band.c lowp.c 
  7. PSRC= sox.c
  8.  
  9. SOURCES   = $(PSRC) $(FSRC) $(ESRC) handlers.c libst.c misc.c getopt.c
  10.  
  11. HEADERS   = st.h libst.h sfheader.h patchlevel.h 
  12.  
  13. TESTS     = tests.sh monkey.au monkey.voc
  14.  
  15. MISC      = README INSTALL TODO sox.man st.man Makefile
  16.  
  17. SKEL      = skel.c skeleff.c
  18.  
  19. FILES     = $(MISC) $(HEADERS) $(SOURCES) $(SKEL) $(TESTS)
  20.  
  21. FOBJ= raw.o voc.o au.o sf.o aiff.o hcom.o 8svx.o sndrtool.o wav.o sbdsp.o
  22. EOBJ= copy.o avg.o pred.o stat.o vibro.o echo.o rate.o band.o lowp.o 
  23.  
  24. SOUNDLIB  = libst.a
  25. LIBOBJS   = $(FOBJ) $(EOBJ) handlers.o libst.o misc.o getopt.o
  26.  
  27. #
  28. # System dependency parameters
  29. #     not many, we don't mess with devices
  30. #
  31. # include -DSYSV for AT&T Unix System V
  32. #
  33. # define -DDOS  to compile on PC
  34. # defines .snd to mean a DOS soundtool file (starts with SOUND)
  35.  
  36. # define -DNeXT on a NeXT workstation
  37. # defines .snd to mean a NeXT sound format file
  38. #      only knows a few real sound formats.
  39.  
  40. # define -DMAC on a MacIntosh
  41. # defines .snd to mean a Mac-style headerless unsigned byte
  42. #      sample, probably at 11050 hertz.  You'll have to set 
  43. #    the speed on the command line.
  44.  
  45.  
  46. # AT&T System V/386 parameters, salt to taste
  47. # Most System V machines should use these flags
  48.  
  49. O=-g        # optimization flags
  50.  
  51. CFLAGS    = $O -DSYSV 
  52. CC        = cc
  53. AR        = ar r
  54. RANLIB    = ar ts
  55.  
  56. # BSD-ish, salt to taste
  57. # Sun, NeXT, Vax, Ultrix uses these
  58.  
  59. # CFLAGS    = $O 
  60. # CC        = cc
  61. # AR        = ar r
  62. # RANLIB    = ranlib
  63.  
  64. # DOS? Mac? They generally have their own makefile formats.
  65. # I think you'll have to write one from scratch.
  66.  
  67. # For DOS, you'll need -DDOS for all files.
  68.  
  69. all: sox
  70.  
  71. sox: sox.o $(SOUNDLIB)
  72.     $(CC) $(CFLAGS) -o sox sox.o $(SOUNDLIB) -lm
  73.  
  74. $(SOUNDLIB): $(LIBOBJS)
  75.     rm -f $(SOUNDLIB)
  76.     $(AR) $(SOUNDLIB) $(LIBOBJS)
  77.     $(RANLIB) $(SOUNDLIB)
  78.  
  79. sox.o:        sox.c st.h
  80.  
  81. $(LIBOBJS):    st.h
  82.  
  83. clean:
  84.     rm -f *.o
  85.     rm -f *.raw
  86.     rm -f *.sf
  87.     rm -f core
  88.  
  89. # Shar: -F (prefix all lines with X), 
  90. #     -s addr (set return addr of poster)
  91. shar: $(FILES)
  92.     /usr2/tools/shar/shar -M -F -l 50 -o shar -n soundtools_v5 -s thinman@netcom.com $(FILES)
  93.